package com.yunchang.springboot.models.DO;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.yunchang.springboot.base.Column;
import com.yunchang.springboot.base.Id;
import com.yunchang.springboot.base.Table;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 采购（马帮api）
 * purchase_data
 * @author WeiziPlus
 * @date 2019-09-03 09:03:02
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@Table("caravan_purchase_data")
public class CaravanPurchaseData implements Serializable {
    /**
     */
    @Id("id")
    private Long id;

    /**
     * 数据获取日期
     */
    @Column("date")
    private String date;

    /**
     */
    @Column("company_id")
    private String companyId;

    /**
     * 采购订单号
     */
    @Column("purchase_id")
    private String purchaseId;

    /**
     */
    @Column("group_id")
    private String groupId;

    /**
     * 1、新采购 2、等待一审 3、等待二审 4、采购中 5、签收 6、验货 7、上架 8、部分到货 9、全部到货 10、已完成 11、异常 12、删除
     */
    @Column("flag")
    private String flag;

    /**
     */
    @Column("flag_desc")
    private String flagDesc;

    /**
     * 总运费
     */
    @Column("freight_sum")
    private BigDecimal freightSum;

    /**
     * 折扣
     */
    @Column("discount_amount")
    private BigDecimal discountAmount;

    /**
     * 税金
     */
    @Column("tax_amount")
    private BigDecimal taxAmount;

    /**
     * 总金额
     */
    @Column("total_amount")
    private BigDecimal totalAmount;

    /**
     * 总金额(税前)
     */
    @Column("pretax_total_amount")
    private BigDecimal pretaxTotalAmount;

    /**
     * 商品总数量
     */
    @Column("quantity_sum")
    private Integer quantitySum;

    /**
     * 未入库数量
     */
    @Column("no_warehousing")
    private Integer noWarehousing;

    /**
     */
    @Column("provider_id")
    private String providerId;

    /**
     * 供应商
     */
    @Column("provider_name")
    private String providerName;

    /**
     */
    @Column("target_warehouse_id")
    private String targetWarehouseId;

    /**
     * 采购仓库
     */
    @Column("target_warehouse_name")
    private String targetWarehouseName;

    /**
     * 备注
     */
    @Column("content")
    private String content;

    /**
     */
    @Column("create_oper_id")
    private String createOperId;

    /**
     * 下单员
     */
    @Column("create_oper_name")
    private String createOperName;

    /**
     * 下单时间
     */
    @Column("create_time")
    private String createTime;

    /**
     */
    @Column("update_time")
    private String updateTime;

    /**
     * 1688实付金额
     */
    @Column("ali1688_sum_payment")
    private BigDecimal ali1688SumPayment;

    /**
     * 最后入库时间
     */
    @Column("last_storage_time")
    private String lastStorageTime;

    /**
     */
    @Column("buyer_id")
    private String buyerId;

    /**
     * 采购员
     */
    @Column("buyer_name")
    private String buyerName;

    /**
     * 处理状态0：新增 1：已生成借贷关系 2：已计算借贷数据
     */
    @Column("handle_status")
    private Integer handleStatus;

    private static final long serialVersionUID = 1L;
}